package cn.com.dcsgo.settlement.calculator;

import cn.com.dcsgo.settlement.OrderAmountContext;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

/**
 * 折减金额计算器
 *
 * @author Dcsgo
 * @since 2025/11/17 18:32
 */
@Component
public class DiscountMoneyCalculator extends AbstractOrderAmountCalculator {
    @Override
    public void calculate(OrderAmountContext orderAmountContext) {
        //目前没有折扣功能，直接写为0
        orderAmountContext.setDiscountAmount(BigDecimal.ZERO);
        if (getNextCalculator() != null) {
            getNextCalculator().calculate(orderAmountContext);
        }
    }
}
